Implement GCID parsing in unicsv and extend ID to 64bit (#501)
authorRalf Horstmann <ralf+github@ackstorm.de>
Fri, 14 Feb 2020 20:09:38 +0000 (21:09 +0100)
committerGitHub <noreply@github.com>
Fri, 14 Feb 2020 20:09:38 +0000 (13:09 -0700)
commitb71ef711e6beb712aa8f8e2099ad5b065c65ce15
treedcc23313cbd9af38005a8dabfe02bac1089eb16f
parent2c84e4f303535f8b3ce050393e3eedfbfffd14ba
Implement GCID parsing in unicsv and extend ID to 64bit (#501)

* Implement GCID parsing in unicsv and extend ID to 64bit

This reimplements the parser and adds some test cases. The test
cases have been validated with several online converters, so this
hopefully works better than the previous implementation.

This also fixes an endless loop that afl managed to trigger.

* Fix clazy warning in unicsv

* Add GC-ID test cases, documentation, int parsing

- Explicitly do the integer parsing with base 10, otherwise hex
  values and octal values would be accepted with 0x and 0 prefix.
- Add testcases that cover GC-ID parsing, including some invalid cases
- Unify the terminology (GC-Code vs GC-ID)
- Add examples to the unicsv documentation showing that both GC-ID
  and GC-Code are accepted
defs.h
gpx.cc
reference/gc/gcid-input.csv [new file with mode: 0644]
reference/gc/gcid-output.csv [new file with mode: 0644]
testo.d/unicsv.test
unicsv.cc
xmldoc/formats/unicsv.xml